<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>test</title>
    <script src="lib/vue.js"></script>
</head>
<body>
    <div id="app">
        <comp :num.sync="num"></comp>
    </div>

    <script>
        new Vue({
            el:"#app",
            data(){
                return {
                    num:0
                }
            },
            components: {
                comp:{
                    props:["num"],
                    template:`
                        <div>
                            <button @click="$emit('update:num',600)">{{num}}</button>
                        </div>
                    `
                }
            },
        })
    </script>
</body>
</html>